package com.yiwich.model.property;

import lombok.Data;

import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.URL;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author ZwT
 * @date 2019-02-14 15:56
 **/
@Component
@Data
@ConfigurationProperties(prefix = "spring.influx")
public class InfluxProperty {
	@URL
	@Value("url")
    private String url;
    @NotBlank
    @Value("user")
    private String user;
    @NotBlank
    @Value("password")
    private String password;
    @NotBlank
    @Value("database")
    private String database;
    @NotBlank
    @Value("retention_policy")
    private String retentionPolicy;
    @NotBlank
    @Value("retention_policy_time")
    private String retentionPolicyTime;
}
